package com.wait;

import com.wait.bean.BinaryTree;
import com.wait.bean.Node;
import com.wait.bean.PwdTable;
import com.wait.config.ContextConfig;
import com.wait.factory.PwdTableFactory;
import com.wait.factory.TreeFactory;
import com.wait.service.FileCompression;
import com.wait.service.HuffmanCode;
import com.wait.util.CharProcess;

import java.io.*;
import java.util.ArrayList;

/**
 * @author Wait
 */
public class MainActivity {



    public static void main(String[] args) throws IOException, ClassNotFoundException {
        String in = "resources/text2";
        ContextConfig config = new ContextConfig();
        config.setFileName(in);
        config.init();
        FileCompression compression = new HuffmanCode();
        File out = new File("resources/out");
        compression.encode(in,out);


    }
}
